//
//  GS_InfornationTableViewCell.m
//  GoodManNews
//
//  Created by dllo on 16/1/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "GS_InfornationTableViewCell.h"

@implementation GS_InfornationTableViewCell

- (void)dealloc
{
    [_imageV release];
    [_titleL release];
    [_winL release];
    [_loseL release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubviews];
    }
    return self;
}

- (void)layoutSubviews

{
    [super layoutSubviews];
    [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(self.contentView).with.offset(10);
        make.top.equalTo(self.contentView).with.offset(10);
        make.bottom.equalTo(self.contentView.mas_bottom).with.offset(-10);
        make.width.equalTo(@60);
        
    }];
    
    [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.imageV.mas_right).with.offset(10);
        make.top.equalTo(self.contentView).with.offset(10);
        make.height.equalTo(@25);
        make.width.equalTo(@100);
        
    }];
    
    [self.winL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.imageV.mas_right).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.height.equalTo(@25);
        make.width.equalTo(@100);
        
    }];
    
    [self.loseL mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.winL.mas_right).with.offset(10);
        make.top.equalTo(self.titleL.mas_bottom).with.offset(10);
        make.height.equalTo(@25);
        make.width.equalTo(@100);
        
    }];
    
}

- (void)createSubviews

{
    self.imageV = [UIImageView new];
//    self.imageV.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:self.imageV];
    
    self.titleL = [UILabel new];
//    self.titleL.backgroundColor = [UIColor magentaColor];
    [self.contentView addSubview:self.titleL];
    
    self.winL = [UILabel new];
//    self.winL.backgroundColor = [UIColor magentaColor];
    [self.contentView addSubview:self.winL];
    
    self.loseL = [UILabel new];
//    self.loseL.backgroundColor = [UIColor magentaColor];
    [self.contentView addSubview:self.loseL];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
